﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;

using BlueCMS.Core.Data;
using BlueCMS.Core.Data.Query.Clauses;
using BlueCMS.Core.Data.Query.Columns;
using BlueCMS.Core.Data.Query.Conditions;
using BlueCMS.Core.Data.Query.Tables;
using BlueCMS.Core.Providers;

namespace BlueCMS.Core.Data.Query.Generator
{
    public abstract partial class QueryGeneratorBase
    {
        protected virtual void GenerateHavingStatement(HavingClause clause, StringBuilder sb, Dictionary<string, DbParameter> parameters)
        {
            if (clause.Next == null)
                return;

            sb.Append(" HAVING ");

            GenerateConditionStatements(clause, sb, parameters);
        }
    }
}
